package com.niuwa.p2p.service.borrowinfomg;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.niuwa.p2p.core.mvc.entity.PageBean;
import com.niuwa.p2p.core.utils.DictConstant.BorrowOperAuditType;
import com.niuwa.p2p.core.utils.DictConstant.LoanAuditStatus;
import com.niuwa.p2p.entity.channel.LoanClaimAudit;
import com.niuwa.p2p.exception.BusinessException;
import com.niuwa.p2p.vo.borrowinfomg.LoanInfoVo;
import com.niuwa.p2p.vo.borrowinfomg.enterpriseinfomg.AppBorrowInfoVo;
import com.niuwa.p2p.vo.borrowinfomg.enterpriseinfomg.P2PBorrowInfoVo;

public interface IBorrowInfoService {
	/**
	 * 查询p2p借款项目信息列表
	 * 
	 * @param paramMap
	 * @return
	 */
	PageBean<P2PBorrowInfoVo> searchP2PBorrowinfo(Map<String, Object> paramMap);

	public boolean addLoanInfo(LoanInfoVo loanInfo) throws BusinessException;

	public boolean updateLoanInfo(LoanInfoVo loanInfo) throws BusinessException;

	public LoanInfoVo loadLoanInfo(String projectNo) throws BusinessException;

	/**
	 * 获取下一个借款编号的数字部分
	 * 
	 * @return
	 */
	public String getNextLoanSeq();

	/**
	 * 查询审核退回记录
	 * 
	 * @return
	 */
	public List<LoanClaimAudit> loadLoanAuditLog(String projectNo);

	/**
	 * 查询渠道的可用额度
	 * 
	 * @param channelCode
	 * @return
	 */
	public BigDecimal loadChannelUsableAmount(String channelCode);

	/**
	 * 根据企业代码查询企业名称
	 * 
	 * @param corpCode
	 * @return
	 */
	public String loadCorpName(String corpCode);

	/**
	 * 更新审核状态
	 * 
	 * @param string
	 * @param projectNo
	 * @param remark
	 * @return
	 */
	boolean updateAuditStatus(LoanAuditStatus auditStatus, String projectNo, Long operator,
			BorrowOperAuditType auditType, String remark);

	/**
	 * 查询App借款项目信息列表
	 * 
	 * @param paramMap
	 * @return
	 */
	PageBean<AppBorrowInfoVo> searchAppBorrowinfo(Map<String, Object> paramMap);

}
